import request from '@/utils/request'

let ServiceApi = {
    /**
     * @description 跳转工作台
     * @params
     * serviceUserId
     * @returns
     */
    workbench(data, errorback) {
      return request._post('/shop/chat/chat/workbench', data, errorback);
    },
  /**
   * @description 平台客服列表
   * @returns
   */
  serviceIndex(data, errorback) { 
    return request._postBody('/shop/chat/chat/serviceList', data, errorback);
  },
  /**
   * @description 编辑平台端客服
   * @returns
   */
  editService(data, errorback) {
    return request._postBody('/shop/chat/chat/editService', data, errorback);
  },
  /**
   * @description 平台端客服详情
   * @params
   * serviceUserId
   * @returns
   */
  serviceDetail(data, errorback) {
    return request._post('/shop/chat/chat/serviceDetail', data, errorback);
  },
  /**
   * @description 删除平台端客服
   * @params
   * serviceUserId
   * @returns
   */
  deleteService(data, errorback) {
    return request._post('/shop/chat/chat/deleteService', data, errorback);
  },
  /**
   * @description 新增平台端客服
   * @params
   * @returns
   */
  addService(data, errorback) {
    return request._postBody('/shop/chat/chat/addService', data, errorback);
  },
  /**
   * @description 获取关注店铺的用户
   * @params
   * @returns
   */
  fansList(data, errorback) {
    return request._postBody('/shop/chat/chat/fansList', data, errorback);
  },
  /**
   * @description 平台客服账号开关
   * @params
   * serviceUserId
   * @returns
   */
  editStatu(data, errorback) {
    return request._post('/shop/chat/chat/editStatu', data, errorback);
  },
  /*聊天列表*/
  servicelist(data, errorback) {
    return request._post('/shop/chat/chat/index', data, errorback);
  },
  /*聊天列表*/
  recordlist(data, errorback) {
    return request._postBody('/shop/chat/chat/record', data, errorback);
  },
  getinfo(data, errorback) {
    return request._post('/shop/chat/chat/getInfo', data, errorback);
  },
  /*聊天移除*/
  remove(data, errorback) {
    return request._post('/shop/chat/chat/remove', data, errorback);
  },
  /*聊天列表*/
  chatlist(data, errorback) {
    return request._postBody('/shop/chat/chat/list', data, errorback);
  },
}

export default ServiceApi;
